from selenium.webdriver.common.by import By

from po_study.base.Base import Base
from po_study.utils.Logger import Logger

logger = Logger('LoginPage').getlog()

class LoginPage(Base):
    def __init__(self,driver):
        Base.__init__(self,driver)

    def input_username(self):
        self.input((By.NAME,'username'),'caichang')
        logger.info(r'输入账号：{username}')

    def input_password(self):
        self.input((By.NAME,'password'),'caichang1')
        logger.info(r'输入密码：{password}')

    def click_login_button(self):
        self.click((By.ID,'tijiao'))
        logger.info(r'点击登录')